@section('title')
    我的资料 @parent
@show

@section('subcontent')
{{ HTML::script('js/center/customer/info.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/vendor/jquery.ui.widget.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/jquery.iframe-transport.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/jquery.fileupload.js') }}
<div id="mainUserInfo">
<div class="mod-main mod-comm lefta-box">
    <div class="mt">
		<h3 class="curr">个人资料</h3> 
    </div>
    <div class="mc">
    	<div class="user-set userset-lcol">
        	
    		<form id="user_info_form">
			    <div class="form">
			    	@if (Auth::user()->isPendingVerification()) 
			    	<div class="form-item" style="color:red">
			            您已经申请成为律师，请等待审核通过。 
			        </div>
			    	@endif
			        <div class="form-item">
			            <span class="label">
			                昵称：
			            </span>
			            <div class="fl">
			            	<span class="realname-show text001">{{ $data['nikname'] }}</span>
			                <a href="javascript:void(0);" class="amend-name">编辑昵称</a>
			            </div>
			        </div>
			        <div class="form-item">
			            <span class="label">
			                手机：
			            </span>
			            <div class="fl">
			                <div>
			                    <span class="text001">
			                        {{ $data['phone'] }}
			                    </span>
			                    @if ($data['phone'] == '') 
				                    <a id="addPhone" href="javascript:void(0);" class="ml5 ftx05">
				                        <s>
				                        </s>
				                        添加手机号
				                    </a>
			                    @else 
				                    <a id="updatePhone" href="javascript:void(0);" class="ml5 ftx05">
				                        <s>
				                        </s>
				                        修改手机号
				                    </a>
			                   @endif
			                </div>
			            </div>
			        </div>
			        <div class="form-item">
			            <span class="label">
			                邮箱：
			            </span>
			            <div class="fl">
			                <div>
			                    <span class="text001">
			                        {{ $data['email'] }}
			                    </span>
			                    @if ($data['email'] == '') 
				                    <a id="nowBindEmail" href="javascript:void(0);" class="ml5 ftx05">
				                        <s>
				                        </s>
				                        立即绑定
				                    </a>
				                @else 
				                    <a id="updateEmail" href="javascript:void(0);" class="ml5 ftx05">
				                        <s>
				                        </s>
				                        修改邮箱号
				                    </a>
			                   @endif
			                </div>
			            </div>
			            <div class="clr">
			            </div>
			        </div>
			        <div class="form-item">

			            <span class="label">
			                头像：
			            </span>
			            <div class="fl">
							<div class="upload_wrap">
								<span class="fileinput-button">
				                    <span>上传头像</span>
				                    <input id="avatar_file" type="file" name="upload_file" multiple 
					                    data-url="{{ Config::get('app.url') }}/center/customer/update_user_image"
									    data-sequential-uploads="true" data-disabled="disabled">
				                    <input type="hidden" name="avatar" id="avatar" value="{{ $data['avatar'] }}">
				                </span>
				               	<span class="remark">（图片建议尺寸：200像素 * 200像素,尺寸不得超过1M）</span>
							    <div class="upload_img_show" >              
				                  <p class="avatar_js_cover upload_preview" @if (count($data['avatar']) > 0) : style="display:block" ? style="display:none" @endif>
				                  	<img id='avatar_peituImg'  src="{{ $data['avatar'] }}" width="100" height="100" style="border-radius: 50%;"/>
				                  </p>
				                </div>
				            </div>
						</div>
			        </div>
			       <!--  <div class="form-item">
			            <span class="label">
			                背景：
			            </span>
			            <div class="fl">
							<div class="upload_wrap">
								<span class="btn btn-success fileinput-button">
				                    <span>上传图片</span>
				                    <input id="bg_image_file" type="file" name="upload_file" multiple 
					                    data-url="{{ Config::get('app.url') }}/center/customer/update_lawyer_bgimage"
									    data-sequential-uploads="true" data-disabled="disabled">
				                    <input type="hidden" name="bg_image" id="bg_image" value="{{ $data['bg_image'] }}">
				                </span>
				               	<span style="color:#999;">（图片建议尺寸：1000像素 * 400像素,尺寸不得超过1M）</span>
								    <div class="upload_img_show">              
					                  <p class="js_cover upload_preview"   @if (count($data['bg_image']) > 0) : style="display:block" ? style="display:none" @endif>
					                  	<img id='bg_imageImg'  src="{{ $data['bg_image'] }}" width="500" height="150"/>
					                  </p>
					                </div>
				            </div>
						</div>
			        </div> -->
			        <div class="form-item">
			            <span class="label">
			                &nbsp;
			            </span>
			            <div class="fl">
			            	{{ Form::token() }}
			                <!-- <a href="javascript:void(0)" class="btn-5 inpbg" id="seveLawyer">
			                    保&nbsp;&nbsp;&nbsp;存
			                </a> -->
			            </div>
			        </div>
			    </div>
			</form>
		</div>
    </div>
</div>
</div>

<script type="text/template" id="phone-tmpl">
<form id="phone_form">
	<div class="javascrpttmpl">
		<label class="errortip"></label>
		<input  type="text" placeholder="请输入手机号码" class="itxt" maxlength="20" id="phone" name="phone" value="{{ $data['phone'] }}"> 
		<div class="phoneCode">
			<input type="text" placeholder="请输入验证码" id="phonecode" name="phonecode" class="itxtcode" autocomplete="off" tabindex="11">
			<button id="chekePhoneCode"  data-href="{{ route('send_code') }}" type="botton" class="inpbg">点击获取验证码</button>
		</div>   
		{{ Form::token() }}
		<a href="javascript:void(0)" class="btn-6 inpbg" id="sevePhone">保 存</a>     
	</div>
</form>
</script>
<script type="text/template" id="email-tmpl">
<form id="email_form">
	<div class="javascrpttmpl">
		<label class="errortip"></label>
		<input  type="email" class="itxt itxt1" maxlength="20" id="email" name="email" value="{{ $data['email'] }}"> <br>                
		{{ Form::token() }}
		<a href="javascript:void(0)" class="btn-6 inpbg" id="seveEmail">保 存</a>          
	</div>
</form>
</script>
<script type="text/template" id="nikname-tmpl">
<form id="nikname_form">
	<div class="javascrpttmpl">
		<label class="errortip"></label>
		<input  type="text" class="itxt itxt1" maxlength="20" id="nikname" name="nikname" value="{{ $data['nikname'] }}"> <br>                
		{{ Form::token() }}
		<a href="javascript:void(0)" class="btn-6 inpbg" id="seveRealname">保 存</a>          
	</div>
</form>
</script>
<script type="text/javascript">
var info_url = "{{ route('center.lawyer.info') }}";
var jumpUrl ="{{ Config::get('app.url') }}";
//省市城的参数
var province_param = "{{ $data['province'] }}";
var city_param = "{{ $data['city'] }}";
var district_param = "{{ $data['district'] }}"; 

var token = $("input:[name='_token']").val();
var userId = "{{ $data['id'] }}"
</script>
@show